package priv.pront.code.lanqiao.competition.course.date0327;

import java.util.Scanner;

public class 守望者的逃离 {
    //    守望者的魔法初值M 他所在的初始位置与岛的出口之间的距离S  岛沉没的时间T
    static int M, S, T, v = 17, recover = 4, tarT;

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        M = scanner.nextInt();
        S = scanner.nextInt();
        T = scanner.nextInt();
        tarT = T;
        int distance = 0;

        distance = 0;
        while (T != 0) {
            if (distance >= S) {
                break;
            }
//            休息的最佳情况
            if (M >= 10) {
                distance += 60;
                M -= 10;
            } else {
                if ((M >= 6 && T >= 2 && S - distance > 2 * v) || (M >= 2 && T >= 3 && S - distance > 3 * v) || (M >= 0 && T >= 4 && S - distance > 4 * v)) {
                    M += recover;
                } else {
                    distance += v;
                }
            }
            T--;
        }
        if (distance >= S) {
            System.out.println("Yes");
            System.out.println(tarT - T);

        } else {
            System.out.println("No");
            System.out.println(distance);
        }
    }
}
